<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

class FamilyEdu extends Model
{
	use HasDateTimeFormatter;
    protected $table = 'eb_family_edu';

    public function article(){
        return $this->hasOne(Article::class,'id','article_id');
    }
    public function articleInfo(){
        return $this->hasOne(ArticleInfo::class,'article_id','article_id');
    }

    public function user(){
        return $this->hasOne(User::class,'id','user_id');
    }

    public function family() {
        return $this->hasOne(Family::class,'id','family_id');
    }

    public function team(){
        return $this->hasOne(HospitalTeam::class,'id','team_id');
    }

    public function hospital(){
        return $this->hasOne(Hospital::class,'id','hospital_id');
    }

    public function familyType(){
        return $this->hasOne(FamilyType::class,'id','family_type_id');
    }
    
}
